From 76eef3f9d9ddac36a5adbf0174ece3fff2131eac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= Date: Thu, 15 Jun 2017 22:22:57 +0100 Subject: Raise an exception right away if the Python version is unsupported. As suggested by @DorianScholz in pull request #14. Use 3.2 as minimum version since that's what I originally targeted. I wonder if there is an easy way to track which features the code is relying upon to keep this up to date. --- glucometer.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/glucometer.py b/glucometer.py index 899bd6d..6622a88 100755 --- a/glucometer.py +++ b/glucometer.py @@ -17,6 +17,10 @@ from glucometerutils import common from glucometerutils import exceptions def main(): + if sys.version_info < (3, 2): + raise Exception( + 'Unsupported Python version, please use at least Python 3.2') + parser = argparse.ArgumentParser() subparsers = parser.add_subparsers(dest="action") -- cgit v1.2.3